package common.view;

import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;

import java.awt.Font;

import javax.swing.JSeparator;
import javax.swing.JComboBox;

import java.awt.Dimension;
import java.awt.event.ActionListener;

import javax.swing.SwingConstants;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.DefaultComboBoxModel;


public class PurchaseOrderView extends JPanel 
{
	private JTextField tfOrderDate;
	private JButton btnOrderDate;
	private JLabel lblOrderNo;
	private JTextField tfOrderNo;
	private JLabel lblIndentDate;
	private JTextField tfIndentDate;
	private JButton btnIndentDate;
	private JTextField tfIndentNo;
	private JTextField tfQuotationDate;
	private JTextField tfQuotationNo;
	private JLabel lblProject;
	private JTextField tfPaymentTerms;
	private JTextField tfInspection;
	private JComboBox cbPaymentMode;
	private JComboBox cbProjectName;
	private JComboBox cbPriority;
	private JButton btnQuotationDate;
	private JSeparator separator2;
	private JLabel lblDestination;
	private JComboBox cbDestination;
	private MaterialAdderView mAdder;
	private JButton btnSave;
	private JScrollPane scrollPane;
	private JTable table;
	private JLabel lblContactPerson;
	private JTextField tfContactPerson;
	private JLabel lblPreparedBy;
	private JComboBox cbPreparedBy;
	private JLabel lblCheckedBy;
	private JComboBox cbCheckedBy;
	private JTextField tfQuantity;
	private JTextField tfRate;
	private JTextField tfDiscount;
	
	public PurchaseOrderView() 
	{
		SpringLayout springLayout = new SpringLayout();
		setLayout(springLayout);
		
		JLabel lblOrderDate = new JLabel("Order Date :");
		lblOrderDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblOrderDate, 10, SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, lblOrderDate, 10, SpringLayout.WEST, this);
		add(lblOrderDate);
		
		tfOrderDate = new JTextField();
		tfOrderDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfOrderDate, 6, SpringLayout.SOUTH,lblOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, tfOrderDate, 10, SpringLayout.WEST,this);
		add(tfOrderDate);
		tfOrderDate.setColumns(10);
		
		btnOrderDate = new JButton("CL");
		btnOrderDate.setActionCommand("orderDate");
		btnOrderDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, btnOrderDate, 0, SpringLayout.NORTH,tfOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, btnOrderDate, 6, SpringLayout.EAST, tfOrderDate);
		add(btnOrderDate);
		
		lblOrderNo = new JLabel("Order No :");
		lblOrderNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblOrderNo, 0, SpringLayout.NORTH, lblOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, lblOrderNo, 20, SpringLayout.EAST, btnOrderDate);
		add(lblOrderNo);
		
		tfOrderNo = new JTextField();
		tfOrderNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfOrderNo, 0, SpringLayout.NORTH,tfOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, tfOrderNo, 0, SpringLayout.WEST, lblOrderNo);
		add(tfOrderNo);
		tfOrderNo.setColumns(10);
		
		lblIndentDate = new JLabel("Indent Date :");
		lblIndentDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblIndentDate, 10, SpringLayout.SOUTH, tfOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, lblIndentDate, 0, SpringLayout.WEST, lblOrderDate);
		add(lblIndentDate);
		
		tfIndentDate = new JTextField();
		tfIndentDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfIndentDate, 6, SpringLayout.SOUTH, lblIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, tfIndentDate, 10, SpringLayout.WEST, this);
		add(tfIndentDate);
		tfIndentDate.setColumns(10);
		
		btnIndentDate = new JButton("CL");
		btnIndentDate.setActionCommand("indentDate");
		btnIndentDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, btnIndentDate, 0, SpringLayout.NORTH,tfIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, btnIndentDate, 6, SpringLayout.EAST, tfIndentDate);
		add(btnIndentDate);
		
		JLabel lblIndentNo = new JLabel("Indent No :");
		lblIndentNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblIndentNo, 0, SpringLayout.NORTH, lblIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, lblIndentNo, 20, SpringLayout.EAST, btnIndentDate);
		add(lblIndentNo);
		
		tfIndentNo = new JTextField();
		tfIndentNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfIndentNo, 0, SpringLayout.NORTH,tfIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, tfIndentNo, 0, SpringLayout.WEST, lblIndentNo);
		add(tfIndentNo);
		tfIndentNo.setColumns(10);
		
		JLabel lblQuotaionDate = new JLabel("Quotation Date:");
		lblQuotaionDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblQuotaionDate, 10, SpringLayout.SOUTH, tfIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, lblQuotaionDate, 10, SpringLayout.WEST, this);
		add(lblQuotaionDate);
		
		tfQuotationDate = new JTextField();
		tfQuotationDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfQuotationDate, 6, SpringLayout.SOUTH, lblQuotaionDate);
		springLayout.putConstraint(SpringLayout.WEST, tfQuotationDate, 10, SpringLayout.WEST,this);
		add(tfQuotationDate);
		tfQuotationDate.setColumns(10);
		
		btnQuotationDate = new JButton("CL");
		btnQuotationDate.setActionCommand("quotationDate");
		btnQuotationDate.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, btnQuotationDate, 0, SpringLayout.NORTH,tfQuotationDate);
		springLayout.putConstraint(SpringLayout.WEST, btnQuotationDate, 6, SpringLayout.EAST, tfQuotationDate);
		
		add(btnQuotationDate);
		
		JLabel lblQuotationNo = new JLabel("Quotation No :");
		lblQuotationNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblQuotationNo, 0, SpringLayout.NORTH, lblQuotaionDate);
		springLayout.putConstraint(SpringLayout.WEST, lblQuotationNo, 20, SpringLayout.EAST, btnQuotationDate);
		add(lblQuotationNo);
		
		tfQuotationNo = new JTextField();
		tfQuotationNo.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfQuotationNo, 0, SpringLayout.NORTH,tfQuotationDate);
		springLayout.putConstraint(SpringLayout.WEST, tfQuotationNo, 0, SpringLayout.WEST,lblQuotationNo);
		add(tfQuotationNo);
		tfQuotationNo.setColumns(10);
		
		JSeparator separator1 = new JSeparator();
		springLayout.putConstraint(SpringLayout.NORTH, separator1, 10, SpringLayout.SOUTH, tfQuotationNo);
		springLayout.putConstraint(SpringLayout.WEST, separator1, 10, SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, separator1, -10, SpringLayout.EAST, this);
		add(separator1);
		
		separator2 = new JSeparator();
		springLayout.putConstraint(SpringLayout.NORTH, separator2, 10, SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, separator2, 10, SpringLayout.EAST, tfQuotationNo);
		springLayout.putConstraint(SpringLayout.SOUTH, separator2, -10, SpringLayout.NORTH, separator1);
		springLayout.putConstraint(SpringLayout.EAST, separator2, 12, SpringLayout.EAST, tfQuotationNo);
		separator2.setOrientation(SwingConstants.VERTICAL);
		add(separator2);
		
		lblProject = new JLabel("Project:");
		springLayout.putConstraint(SpringLayout.NORTH, lblProject, 10, SpringLayout.NORTH,this);
		springLayout.putConstraint(SpringLayout.WEST, lblProject, 10, SpringLayout.WEST,separator2);
		lblProject.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(lblProject);
		
		cbProjectName = new JComboBox();
		springLayout.putConstraint(SpringLayout.NORTH, cbProjectName, 10, SpringLayout.SOUTH, lblProject);
		springLayout.putConstraint(SpringLayout.WEST, cbProjectName, 10, SpringLayout.WEST,separator2);
		cbProjectName.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		cbProjectName.setPreferredSize(new Dimension(200, 20));
		add(cbProjectName);
		
		JLabel lblPriority = new JLabel("Priority:");
		springLayout.putConstraint(SpringLayout.NORTH, lblPriority, 10, SpringLayout.SOUTH,cbProjectName);
		springLayout.putConstraint(SpringLayout.WEST, lblPriority, 10, SpringLayout.EAST,separator2);
		lblPriority.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(lblPriority);
		
		cbPriority = new JComboBox();
		cbPriority.setModel(new DefaultComboBoxModel(new String[] {"IMMEDIATE", "URGENT", "NORMAL"}));
		springLayout.putConstraint(SpringLayout.NORTH, cbPriority, 6, SpringLayout.SOUTH, lblPriority);
		springLayout.putConstraint(SpringLayout.WEST, cbPriority, 10, SpringLayout.EAST,separator2);
		cbPriority.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		cbPriority.setPreferredSize(new Dimension(200, 20));
		add(cbPriority);
		
		lblDestination = new JLabel("Destination:");
		springLayout.putConstraint(SpringLayout.NORTH, lblDestination, 10, SpringLayout.SOUTH,cbPriority);
		springLayout.putConstraint(SpringLayout.WEST, lblDestination, 10, SpringLayout.EAST,separator2);
		lblDestination.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(lblDestination);
		
		cbDestination = new JComboBox();
		cbDestination.setModel(new DefaultComboBoxModel(new String[] {"SIRWAL", "WAKAD"}));
		springLayout.putConstraint(SpringLayout.NORTH, cbDestination, 6, SpringLayout.SOUTH,lblDestination);
		springLayout.putConstraint(SpringLayout.WEST, cbDestination, 10, SpringLayout.EAST,separator2);
		cbDestination.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		cbDestination.setPreferredSize(new Dimension(200, 20));
		add(cbDestination);
		
		lblContactPerson = new JLabel("Contact Person:");
		springLayout.putConstraint(SpringLayout.WEST, lblContactPerson,20, SpringLayout.EAST,cbDestination);
		lblContactPerson.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblContactPerson, 10, SpringLayout.NORTH,this);
		add(lblContactPerson);
		
		tfContactPerson = new JTextField();
		tfContactPerson.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, tfContactPerson, 6, SpringLayout.SOUTH, lblOrderDate);
		springLayout.putConstraint(SpringLayout.WEST, tfContactPerson, 0, SpringLayout.WEST,lblContactPerson);
		add(tfContactPerson);
		tfContactPerson.setColumns(10);
		
		lblPreparedBy = new JLabel("Prepared By:");
		springLayout.putConstraint(SpringLayout.WEST, lblPreparedBy, 20, SpringLayout.EAST,tfContactPerson);
		lblPreparedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblPreparedBy, 0, SpringLayout.NORTH, lblContactPerson);
		add(lblPreparedBy);
		
		cbPreparedBy = new JComboBox();
		cbPreparedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, cbPreparedBy, 6, SpringLayout.SOUTH, lblPreparedBy);
		springLayout.putConstraint(SpringLayout.WEST, cbPreparedBy, 0, SpringLayout.WEST, lblPreparedBy);
		cbPreparedBy.setPreferredSize(new Dimension(200, 20));
		add(cbPreparedBy);
		
		lblCheckedBy = new JLabel("Checked By:");
		springLayout.putConstraint(SpringLayout.WEST, lblCheckedBy, 0, SpringLayout.WEST,lblPreparedBy);
		lblCheckedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, lblCheckedBy, 10, SpringLayout.SOUTH, cbPreparedBy);
		add(lblCheckedBy);
		
		cbCheckedBy = new JComboBox();
		cbCheckedBy.setPreferredSize(new Dimension(200, 20));
		cbCheckedBy.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.NORTH, cbCheckedBy, 0, SpringLayout.NORTH, tfIndentDate);
		springLayout.putConstraint(SpringLayout.WEST, cbCheckedBy, 0, SpringLayout.WEST, lblPreparedBy);
		add(cbCheckedBy);
			
		JLabel lblPaymentTerms = new JLabel("Payment Terms:");
		springLayout.putConstraint(SpringLayout.NORTH, lblPaymentTerms, 10, SpringLayout.SOUTH,tfContactPerson);
		lblPaymentTerms.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.WEST, lblPaymentTerms, 0, SpringLayout.WEST,lblContactPerson);
		add(lblPaymentTerms);
		
		tfPaymentTerms = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, tfPaymentTerms, 6, SpringLayout.SOUTH,lblPaymentTerms);
		tfPaymentTerms.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		springLayout.putConstraint(SpringLayout.WEST, tfPaymentTerms, 0, SpringLayout.WEST, lblPaymentTerms);
		add(tfPaymentTerms);
		tfPaymentTerms.setColumns(10);
		
		JLabel lblInspection = new JLabel("Inspection:");
		springLayout.putConstraint(SpringLayout.NORTH, lblInspection, 10, SpringLayout.SOUTH, tfPaymentTerms);
		springLayout.putConstraint(SpringLayout.WEST, lblInspection, 0, SpringLayout.WEST, tfPaymentTerms);
		lblInspection.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(lblInspection);
		
		tfInspection = new JTextField();
		springLayout.putConstraint(SpringLayout.NORTH, tfInspection, 6, SpringLayout.SOUTH, lblInspection);
		springLayout.putConstraint(SpringLayout.WEST, tfInspection, 0, SpringLayout.WEST, lblInspection);
		tfInspection.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(tfInspection);
		tfInspection.setColumns(10);
		
		JLabel lblPaymentMode = new JLabel("Payment Mode:");
		springLayout.putConstraint(SpringLayout.NORTH, lblPaymentMode, 10, SpringLayout.SOUTH,cbCheckedBy);
		springLayout.putConstraint(SpringLayout.WEST, lblPaymentMode, 0, SpringLayout.WEST,cbCheckedBy);
		lblPaymentMode.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		add(lblPaymentMode);
		
		cbPaymentMode = new JComboBox();
		cbPaymentMode.setModel(new DefaultComboBoxModel(new String[] {"CASH", "CHEQUE"}));
		springLayout.putConstraint(SpringLayout.NORTH, cbPaymentMode, 6, SpringLayout.SOUTH,lblPaymentMode);
		springLayout.putConstraint(SpringLayout.WEST, cbPaymentMode, 0, SpringLayout.WEST,lblPaymentMode);
		cbPaymentMode.setFont(new Font("MS Reference Sans Serif", Font.PLAIN, 12));
		cbPaymentMode.setPreferredSize(new Dimension(200, 20));
		add(cbPaymentMode);
		
		btnSave = new JButton("SAVE");
		btnSave.setActionCommand("SAVE");
		springLayout.putConstraint(SpringLayout.WEST, btnSave, 200, SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.SOUTH, btnSave, -10, SpringLayout.SOUTH, this);
		add(btnSave);
		
		mAdder = new MaterialAdderView();
		springLayout.putConstraint(SpringLayout.NORTH, mAdder, 10, SpringLayout.SOUTH, separator1);
		springLayout.putConstraint(SpringLayout.WEST, mAdder, 0, SpringLayout.WEST, lblOrderDate);
		//springLayout.putConstraint(SpringLayout.EAST, mAdder, -10, SpringLayout.WEST,scrollPane);
		add(mAdder);
		
		scrollPane = new JScrollPane();
		springLayout.putConstraint(SpringLayout.SOUTH, scrollPane, -10, SpringLayout.NORTH, btnSave);
		springLayout.putConstraint(SpringLayout.EAST, scrollPane, -10, SpringLayout.EAST, this);
		springLayout.putConstraint(SpringLayout.WEST, scrollPane, 200, SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.NORTH, scrollPane, 10, SpringLayout.SOUTH, separator1);
		add(scrollPane);
		
		table = new JTable();
		table.setModel(new DefaultTableModel(
			new Object[][] {
			},
			new String[] {
				"Sr. No", "Item", "Specifications", "Unit", "Rate", "Discount", "Amount"
			}
		));
		scrollPane.setViewportView(table);	
	}

	public JTextField getTfOrderDate() {
		return tfOrderDate;
	}

	public void setTfOrderDate(JTextField tfOrderDate) {
		this.tfOrderDate = tfOrderDate;
	}

	public JButton getBtnOrderDate() {
		return btnOrderDate;
	}

	public void setBtnOrderDate(JButton btnOrderDate) {
		this.btnOrderDate = btnOrderDate;
	}

	public JTextField getTfOrderNo() {
		return tfOrderNo;
	}

	public void setTfOrderNo(JTextField tfOrderNo) {
		this.tfOrderNo = tfOrderNo;
	}

	public JTextField getTfIndentDate() {
		return tfIndentDate;
	}

	public void setTfIndentDate(JTextField tfIndentDate) {
		this.tfIndentDate = tfIndentDate;
	}

	public JButton getBtnIndentDate() {
		return btnIndentDate;
	}

	public void setBtnIndentDate(JButton btnIndentDate) {
		this.btnIndentDate = btnIndentDate;
	}

	public JTextField getTfIndentNo() {
		return tfIndentNo;
	}

	public void setTfIndentNo(JTextField tfIndentNo) {
		this.tfIndentNo = tfIndentNo;
	}

	public JTextField getTfQuotationDate() {
		return tfQuotationDate;
	}

	public void setTfQuotationDate(JTextField tfQuotationDate) {
		this.tfQuotationDate = tfQuotationDate;
	}

	public JTextField getTfQuotationNo() {
		return tfQuotationNo;
	}

	public void setTfQuotationNo(JTextField tfQuotationNo) {
		this.tfQuotationNo = tfQuotationNo;
	}

	public JTextField getTfPaymentTerms() {
		return tfPaymentTerms;
	}

	public void setTfPaymentTerms(JTextField tfPaymentTerms) {
		this.tfPaymentTerms = tfPaymentTerms;
	}

	public JTextField getTfInspection() {
		return tfInspection;
	}

	public void setTfInspection(JTextField tfInspection) {
		this.tfInspection = tfInspection;
	}

	public JComboBox getCbPaymentMode() {
		return cbPaymentMode;
	}

	public void setCbPaymentMode(JComboBox cbPaymentMode) {
		this.cbPaymentMode = cbPaymentMode;
	}

	public JComboBox getCbProjectName() {
		return cbProjectName;
	}

	public void setCbProjectName(JComboBox cbProjectName) {
		this.cbProjectName = cbProjectName;
	}

	public JComboBox getCbPriority() {
		return cbPriority;
	}

	public void setCbPriority(JComboBox cbPriority) {
		this.cbPriority = cbPriority;
	}

	public JButton getBtnQuotationDate() {
		return btnQuotationDate;
	}

	public void setBtnQuotationDate(JButton btnQuotationDate) {
		this.btnQuotationDate = btnQuotationDate;
	}

	public JComboBox getCbDestination() {
		return cbDestination;
	}

	public void setCbDestination(JComboBox cbDestination) {
		this.cbDestination = cbDestination;
	}

	public MaterialAdderView getmAdder() {
		return mAdder;
	}

	public void setmAdder(MaterialAdderView mAdder) {
		this.mAdder = mAdder;
	}

	public JButton getBtnSave() {
		return btnSave;
	}

	public void setBtnSave(JButton btnSave) {
		this.btnSave = btnSave;
	}

	public JTable getTable() {
		return table;
	}

	public void setTable(JTable table) {
		this.table = table;
	}

	public JTextField getTfContactPerson() {
		return tfContactPerson;
	}

	public void setTfContactPerson(JTextField tfContactPerson) {
		this.tfContactPerson = tfContactPerson;
	}

	public JComboBox getCbCheckedBy() {
		return cbCheckedBy;
	}

	public void setCbCheckedBy(JComboBox cbCheckedBy) {
		this.cbCheckedBy = cbCheckedBy;
	}

	public JComboBox getCbPreparedBy() {
		return cbPreparedBy;
	}

	public void setCbPreparedBy(JComboBox cbPreparedBy) {
		this.cbPreparedBy = cbPreparedBy;
	}

	public JTextField getTfQuantity() {
		return tfQuantity;
	}

	public void setTfQuantity(JTextField tfQuantity) {
		this.tfQuantity = tfQuantity;
	}

	public JTextField getTfRate() {
		return tfRate;
	}

	public void setTfRate(JTextField tfRate) {
		this.tfRate = tfRate;
	}

	public JTextField getTfDiscount() {
		return tfDiscount;
	}

	public void setTfDiscount(JTextField tfDiscount) {
		this.tfDiscount = tfDiscount;
	}
	
	public void actionlisteneres(ActionListener al)
	{
		btnIndentDate.addActionListener(al);
		btnQuotationDate.addActionListener(al);
		btnOrderDate.addActionListener(al);
		btnSave.addActionListener(al);
	}
}
